<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* p>samp { /* 里面的 
        color: salmon;
      } */
      /* samp + p { */
      /* 挨着的兄弟 */
      /* color: sandybrown; */
      /* } */
      /* p ~ p { */
      /* 所有兄弟 */
      /* color: seagreen; */
      /* } */
      /* p samp { */
      /* 后代 */
      /* color: #666; */
      /* } */
    </style>
    <style>
      body {
        color: red;
        background-color: silver;
      }
      p {
        background-color: skyblue;
      }

      /* .box{
        background-color:skyblue;
        width: 200px;
        height: 200px;
      } */

      html {
        font-size: 10px;
      }

      .box2 {
        background-color: slateblue;
        width: 10rem; /* 根据根元素(html)的字体大小设置 */
        height: 10em; /* 根据当前字体设置 */
        color: rgba(0, 0, 0, 0.2);
        font-size: 10px;
        /* border-left-width: 5px;
        border-left-style: dashed;
        border-color: rgb(90, 205, 171); */
        border-width: 5px;
        border-style: dashed;
        border-color: salmon;
        margin-left: 100px;
        margin-top: 100px;
        margin-bottom: 100px;
        margin-right: 100px;
        overflow: auto; /* 子元素超长的解决办法 */
      }

      .box3 {
        background-color: rgb(90, 205, 171);
        width: 10rem; /* 根据根元素(html)的字体大小设置 */
        height: 10em; /* 根据当前字体设置 */
        color: rgba(0, 0, 0, 0.2);
        font-size: 10px;
        visibility: hidden; /* 隐藏元素 */
      }

      .div1 {
        background-color: salmon;
        width: auto;
        height: 100px;
        margin: auto;
        overflow: scroll;
      }

      .div2 {
        width: 200px;
        background-color: sienna;
        font-size: 20px;
        visibility: visible;
      }

      a {
      }
      a:hover {
        visibility: hidden;
      }
      * {
        padding: 0px;
        margin: 0px;
      }
    </style>
  </head>
  <body>
    <!-- <p>第一个p</p>
    <samp>不是亲兄弟</samp>
    <p>第二个p</p>
    <samp>er</samp>
    <p>
      第三个p
      <samp
        >第一个samp
        <samp>samp的samp</samp>
      </samp>
      <samp>第二个samp</samp>
    </p>
    <span>第四个span</span> -->

    <!-- <p>saneryi</p>
    <div>
      <p>yiersansiwu</p>
    </div> -->

    <!-- <div class="box">
      <div class="box2"></div>
      <div class="box3"></div>
    </div> -->

    <div class="div1">
      
      <a
        ><div class="div2">
          Lorem ipsum dolor sit amet consectetur adipisicing elit. Vel commodi
          consequuntur sed recusandae cupiditate odit debitis amet hic, at iste
          laudantium nihil deserunt in expedita obcaecati natus ab voluptatibus
          architecto.
        </div></a
      >
    </div>
  </body>
</html>
